//引用模拟数据
// import "./mock";
import Vue from "vue";
import App from "./App.vue";
// import App from "./components/Layout/test.vue";
import "./styles/global.less";
import router from "@/router";

//引入弹出消息功能
import { showMessage } from "@/utils";
//将该功能添加到Vue的原型链中
Vue.prototype.$showMessage = showMessage;

Vue.config.productionTip = false;

//注册全局指令，加载
import vloading from "@/directives/loading/";
Vue.directive("loading", vloading);
//实现图片懒加载
import vlazy from "@/directives/lazy";
Vue.directive("lazy", vlazy);
// import * as blogapi from "@/api/getBlog";
// blogapi.getComments().then((r) => console.log(r));

//导入共享数据库
import store from "./store";
store.dispatch("setting/fetchSetting");

new Vue({
	store,
	router,
	render: (h) => h(App),
}).$mount("#app");
